package webApiEntities.Requests;

import java.util.ArrayList;

import entities.Entity;
import entities.Movie;
import entities.Show;
import entities.Theater;
import webApiEntities.MessageType;
import webApiEntities.Responses.IResponseMessage;
import webApiEntities.Responses.ShowResponseMessage;

public class ShowRequestMessage extends BasicRequestMessage {

	public ShowRequestMessage(ArrayList<Class<?>> byType, ArrayList<ArrayList<Entity>> byObj) {
		super(MessageType.Show, byType, byObj);
	}

	@Override
	public IResponseMessage HandleRequest() throws Exception {
		// VLN: until that i will return always the same 2 movies.
		Theater theater1 = new Theater("yes-planet");
		Theater theater2 = new Theater("cinema-city");
		
		Movie movie1 = new Movie("Movie1");
		Movie movie2 = new Movie("Movie2");
		
		Show show1 = new Show(theater1, movie1, null);
		Show show2 = new Show(theater2, movie2, null);
		
		ArrayList<Entity> requestedShows = new ArrayList<Entity>();
		requestedShows.add(show1);
		requestedShows.add(show2);
		
		ShowResponseMessage responseMessage = new ShowResponseMessage(requestedShows);
		
		return responseMessage;
	}
	
}
